﻿<!DOCTYPE html>
<html>
<!-- 安全活动里程碑 -->

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>

<body>
    
<div id="app" v-cloak>   
        <el-form label-position="right" ref="form" :inline="true" :model="formInline" class="demo-form-inline"
            style="margin-bottom: 15px;">
            <el-row>
                <el-col class="head-tool">
                    
<div class="new_title fl"><strong><img src="/static/images/icon1.png" />安全活动里程碑列表</strong></div>
<span>
    <btn :text="col.btnSelect" imgsrc="/static/images/search.png" linetype="3" @click="onSubmit">
    </btn>
    <btn :text="col.btnAdd" linetype="3" @click="UserInput('tj')"></btn>
    <btn-uploadfile-list url="/api/ZB_SafetyMilestone/Import" linetype="3"></btn-uploadfile-list>
    <btn-export-list url="/api/ZB_SafetyMilestone/Export" :forminline="this.formInline" linetype="3"></btn-export-list>
    <!--<btn :text="col.btnDownLoadTemplate" imgsrc="/static/images/general.png" linetype="3"
         @click="btnDownLoadTemplate"></btn>-->
    <btn-template-download tempname="安全里程碑活动模板.xlsx"></btn-template-download>
    <btn :text="col.btnDelete" linetype="4" @click="onDelete"></btn>
</span>
                </el-col>
            </el-row>
            <el-row  class="popupW100">
                <!--工厂组件-->
                <!--<list-factorys @change="factoryChange" v-model="formInline.model.createFactory"></list-factorys>-->
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input v-model="formInline.model.activityName"
                                      :placeholder="SafetyMilestone.activityName" size="mini">
                                <template slot="prepend">
                                    {{SafetyMilestone.activityName+mark.m}}
                                </template>
                            </el-input>

                        </el-form-item>
                    </div>
                </el-col>

                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{SafetyMilestone.activityTimeStart+mark.m}}
                                </template>
                                <el-date-picker v-model="formInline.model.activityTimeStart" type="year" slot="suffix"
                                                size="mini" placeholder="选择日期">
                                </el-date-picker>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <el-col :xs="8" :sm="8" :md="8" :lg="6" :xl="6">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input size="mini">
                                <template slot="prepend">
                                    {{SafetyMilestone.activityTimeEnd+mark.m}}
                                </template>
                                <el-date-picker v-model="formInline.model.activityTimeEnd" type="year" slot="suffix"
                                                size="mini" placeholder="选择年份">
                                </el-date-picker>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
            </el-row>
        </el-form>
        <el-table ref="table" stripe :data="ListItem.tableData" :row-key="getRowKeys" :height="ListItem.tableHeight" border
            @selection-change="handleSelectionChange" row-style="height:10px" style="width: 100%;">
            <el-table-column type="selection" style="
            padding-top: 0px;
            padding-bottom: 0px;
        " align="center" width="55" :reserve-selection="true">
                    </el-table-column>
            <el-table-column type="index" :label="col.SequenceNumber" :index="indexMethod" width="50"
                show-overflow-tooltip="true"></el-table-column>
            <el-table-column prop="activityName" :label="SafetyMilestone.activityName" width="">
            </el-table-column>
            <el-table-column prop="year" :label="SafetyMilestone.activityTime" width="120">
            </el-table-column>
            <el-table-column prop="activtyTimeinterval" :label="SafetyMilestone.activityTimeItem" width="120">
            </el-table-column>
            <el-table-column width="100" :label="col.stWork" fixed="right">
                    <template slot-scope="scope">
                            <button type="button" class="elst-bt-xg" @click=UserInput('xg',scope.row.id) :title="col.btnUpdate">
                                <i class="el-icon-edit"></i>
                            </button>
                            <button type="button" class="elst-bt-xg" @click=UserInputCK('xg',scope.row.id) :title="col.btnCheck">
                                <i class="el-icon-search"></i>
                            </button>
                        </template>
            </el-table-column>

        </el-table>
        <el-row type="flex" justify="end">
            <el-pagination ref="page" @size-change="handleSizeChange" @current-change="handleCurrentChange"
                :current-page="ListItem.currentPage" :page-sizes="ListItem.pagesizes" :page-size="ListItem.pagesize"
                :layout="ListItem.layout" :total="ListItem.total">
            </el-pagination>
        </el-row>
        <!-- 弹出页 -->
        <el-dialog title="安全活动里程碑" fullscreen="true" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%" height="80%"
            top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                value1: "",
                //表单内容
                ListItem: ListItem,
                //获取下拉菜单hiddenTroubleClass
                hiddenTroubleClass: [],
                YNFinish: [],
                formInline: {
                    model: { activityTimeStart: '', activityTimeEnd: '', hiddenTroubleClass: '', headOperations: '' },
                    offset: 0,
                    limit: 10
                }
            },
            
            created: function () {
                //var currApp = this;
                //window.onresize = function () {
                //    currApp.ListItem.tableHeight = window.innerHeight -
                //        currApp.$refs.table.$el.offsetTop - 60;
                //    if (currApp.ListItem.tableHeight < 112) {
                //        currApp.ListItem.tableHeight = 112;
                //    }
                //}
            },
            mounted: function () {

              //  console.log(getDicDataArray(["01", "02", "03", "04"]))
                //获取下拉菜单内容
                //this.hiddenTroubleClass = getDicData('59');
                //this.YNFinish = getDicData('50');
                //初始化数据
              this.GetPageData(1);
                //列表高度自适应
                tablehigh(this);
            },
            methods: {
              
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                btnDownLoadTemplate: function () {
                    this.$message({
                        message: '模版下载成功',
                        type: 'success'
                    });
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                //关闭Dialog 回调
                closeDialog: function () { closeDialog(this); },
                //删除方法
                onDelete: function () { onDelete(this, '/api/ZB_SafetyMilestone/DeleteMuti'); },
                //列表选择触发
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
                //Dialog展示
                UserInput: function (val, id) { DialogShow(this, val, "SafetyMilestonesInput.html", id); },
                UserInputCK: function (val, id) { DialogShow(this, val, "SafetyMilestonesInputMine.html", id); },
                //获取分页数据
                GetPageData: function (currentIndex) { GetPageData(this, currentIndex, '/api/ZB_SafetyMilestone/GetList') },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                //pagesize改变 触发方法
                handleSizeChange: function (val) { handleSizeChange(this, val); },
                //跳页触发方法
                handleCurrentChange: function (val) { handleCurrentChange(this, val); },
                //获取下拉菜单数据
                getDropDown: function () {
                }

            }
        });
    </script>
</body>

</html>